package com.atguigu.product.service.impl;

import com.atguigu.Product.Product;
import com.atguigu.product.service.ProductService;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.concurrent.TimeUnit;


@Service
public class ProductServiceImpl implements ProductService {
    @Override
    public Product getProductById(Long id ) {
        Product product = new Product();
        product.setId(id);
        product.setProductName("小米手机");
        product.setPrice(new BigDecimal(1000));
        product.setNum(20);

//        try {
//            TimeUnit.SECONDS.sleep(2);
//        } catch (InterruptedException e) {
//            throw new RuntimeException(e);
//        }
        return product;
    }
}
